const Generator = require('yeoman-generator')

module.exports = class extends Generator {
  prompting (){
    return this.prompt([
      {
        type:'input',
        name:'title',
        message:'请输入标题',
        default: this.appname
      }
    ]).then(answer => {
      this.answers = answer
    })
  }
  writing () {
    const tmpl = this.templatePath('index.html')
    const output = this.destinationPath('index.html')
    this.fs.copyTpl(tmpl,output,this.answers)
  }
}